﻿using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

namespace TNO.Education.SearchStdScore
{
    [ToolboxItemAttribute(false)]
    public class SearchStdScore : WebPart
    {
        // Visual Studio might automatically update this path when you change the Visual Web Part project item.
        private const string _ascxPath = @"~/_CONTROLTEMPLATES/TNO.Education/SearchStdScore/SearchStdScoreUserControl.ascx";

        #region Properties

        private int _year = DateTime.Today.Year;
        [Personalizable(PersonalizationScope.Shared),
        WebBrowsable(true), WebDisplayName("Năm"), Category("Customize"), Description("Năm tra cứu điểm chuẩn")]
        public int Year
        {
            get
            {
                return _year;
            }
            set
            {
                _year = value;
            }
        }

        #endregion

        #region Constructors
        public SearchStdScore()
        {
            this.ChromeType = PartChromeType.None;
        } 
        #endregion

        #region Methods
        protected override void CreateChildControls()
        {
            Control control = Page.LoadControl(_ascxPath);
            Controls.Add(control);
        } 
        #endregion

    }
}
